package com.ttg.web.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ttg.model.mapper.OrganTokenMapper;
import com.ttg.model.pojo.OrganToken;
import com.ttg.web.service.OrganTokenService;
import org.springframework.stereotype.Service;

/**
 * @author ZQ
 * @version 1.0
 * @Description
 * @date 2021/1/15 16:16
 */
@Service
public class OrganTokenServiceImpl extends ServiceImpl<OrganTokenMapper, OrganToken> implements OrganTokenService {
    @Override
    public OrganToken getOrganTokenByTokenAndStatus(String tokenToken, Integer tokenStatus) {
        LambdaQueryWrapper<OrganToken> wrapper = new LambdaQueryWrapper<OrganToken>()
            .eq(OrganToken::getTokenStatus, tokenStatus)
            .eq(OrganToken::getTokenToken,tokenToken);
        return super.getOne(wrapper);
    }
}
